% chap1.tex
\ifx \allfiles \undefined

\documentclass[UTF8,a4paper,12pt]{article}
% --------------------------------Chinese-----------------------------
% \usepackage{CTEX}
\usepackage[BoldFont]{xeCJK}
\setCJKmainfont[BoldFont=AdobeHeitiStd-Regular]{AdobeSongStd-Light}
\setCJKfamilyfont{song}{AdobeSongStd-Light}
\setCJKfamilyfont{fs}{Sun Yat-sen Hsingshu}
\setCJKfamilyfont{hei}[BoldFont={AdobeHeitiStd-Regular},ItalicFont={AdobeKaitiStd-Regular}]{AdobeHeitiStd-Regular}
\setCJKfamilyfont{kai}{AdobeKaitiStd-Regular}

\newcommand{\song}{\CJKfamily{song}}    % 宋体
\newcommand{\fs}{\CJKfamily{fs}}        % 仿宋体
\newcommand{\kai}{\CJKfamily{kai}}      % 楷体
\newcommand{\hei}{\CJKfamily{hei}}      % 黑体
\newcommand{\li}{\CJKfamily{li}}        % 隶书
\newcommand{\you}{\CJKfamily{you}}      % 幼圆
\def\songti{\song}
\def\fangsong{\fs}
\def\kaishu{\kai}
\def\heiti{\hei}
\def\lishu{\li}
\def\youyuan{\you}

\renewcommand{\contentsname}{\centerline{目\ \ 录}}     % 将Contents改为目录
\renewcommand{\abstractname}{摘\ \ 要} % 将Abstract改为摘要
\renewcommand{\refname}{参考文献}      % 将References改为参考文献
\renewcommand{\indexname}{索引}
\renewcommand{\figurename}{图}
\renewcommand{\tablename}{表}
\renewcommand{\appendixname}{附录}

% ---------------------------------Format-----------------------------
\usepackage[top=3cm,bottom=3cm,left=3cm,right=3cm]{geometry}
\usepackage{lscape}
\usepackage{indentfirst}
\usepackage{textcomp}               % Supports the Text Companion fonts which provide many text symbols
\usepackage{setspace}                % 各种间距设置
\sloppy
\linespread{1.2}                           % 设置行距
\setlength{\parindent}{22pt}        % 段落缩进
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
\usepackage{multicol}               % 支持多栏
\setlength{\columnsep}{22pt}        % 中间空白宽度


%\pagestyle{plain}

\usepackage{fancyhdr}
\setlength{\headheight}{15pt}
\pagestyle{fancy}
\renewcommand{\sectionmark}[1]{%
\markboth{\thesection.\ #1}{}}
% \lhead{\bfseries Semiparametric Regression for the Social
%     Sciences}
% \chead{}
% \rhead{\thepage}
% \lfoot{\thesection}
% \cfoot{}
% \rfoot{}
% \renewcommand{\headrulewidth}{0.4pt}
% \renewcommand{\footrulewidth}{0.4pt}

% ---------------------------------Tools------------------------------
\usepackage{graphicx}                           % 支持图形
\usepackage{url}                                    % 对网址进行处理
\usepackage{color}                                % 颜色支持
\usepackage{datetime}
\yyyymmdddate
\renewcommand{\dateseparator}{-}
\usepackage[colorlinks=true,citecolor=red]{hyperref}  %各种引用、书签生成
\usepackage[noae]{Sweave}                  % Rnw 支持
\setkeys{Gin}{width=0.8\textwidth}            % 更改Sweave默认图的宽度
\usepackage{svn-multi}
\usepackage[perpage,symbol*]{footmisc}     % 脚注控制
\usepackage{pifont}                        % 脚注带圈


% ---------------------------------Math------------------------------
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{bm}                 % 数学公式中bold支持
\usepackage{amsfonts}
\usepackage[retainorgcmds]{IEEEtrantools}  % IEEE数学排版
% \usepackage{txfonts}          % 一些数学符号用到，支持Times字体，会变丑
\numberwithin{equation}{section}
% \usepackage[sloped]{fourier}  % 它可将正文字体和数学式字符转变为乌托邦字体字符
% \usepackage[OT1]{fontenc}     % 乌托邦字体字符中文支持
% \usepackage{mathbbold}
\newcommand{\ud}{\,\mathrm{d}}             % 积分中的 d，前面有一个空格

% ---------------------------------Table------------------------------
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{array}              % 提供表格中每一列的宽度及位置支持
\usepackage{siunitx}
\usepackage{multirow}
\usepackage{rotating}
\usepackage{float}
\usepackage{dcolumn}

% \usepackage{tabularx}

% -----------------------------Ref and Bib----------------------------
\usepackage[super,square,sort&compress]{natbib} % 参数代表：数字和排序与压缩
%\usepackage[sort&compress]{natbib} % 参数代表：数字和排序与压缩
\setlength{\bibsep}{0ex}                        % 参考文献中行距缩小


% ------------------------Figure and Table Caption---------------------
% \usepackage[margin=10pt,font={small},labelfont=bf,labelsep=endash]{caption}
\makeatletter                        % 图表标题格式设置
\renewcommand{\fnum@table}[1]{\small \bfseries\tablename\thetable~~}
\renewcommand{\fnum@figure}[1]{\small \CJKfamily{hei} \figurename\thefigure~~}
\makeatother
\renewcommand{\thefigure}{\thesection.\arabic{figure}}
\numberwithin{figure}{section}
\renewcommand{\thetable}{\thesection.\arabic{table}}
\numberwithin{table}{section}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}


% ------------------------Chapter Section Title-------------------------
% \CTEXsetup[name={,、}, number={\chinese{section}}, aftername={},
% format={\centering \large \bfseries \heiti }, indent={0pt},
% beforeskip={1ex plus 1ex minus .2ex},
% afterskip={1ex plus 1ex minus .2ex}]
% {section}
% \CTEXsetup[name={(,)}, number={\chinese{subsection}}, aftername={},
% format={\normalsize \bfseries \songti}, indent={\parindent},
% beforeskip={0.5ex plus 1ex minus .2ex},
% afterskip={0.5ex plus 1ex minus .2ex}]
% {subsection}
% \CTEXsetup[name={,.}, number={\arabic{subsubsection}},
% aftername={}, format={\normalsize \bfseries \songti},indent={\parindent},
% beforeskip={0ex plus 1ex minus .2ex},
% afterskip={0.2ex plus 1ex minus .2ex}]
% {subsubsection}

% --------------------------Document Begin-------------------------------
\begin{document}
\renewcommand\thefootnote{\ding{\numexpr171+\value{footnote}}}

\fi

